#include <QCoreApplication>
#include "cont.h"
void firstTest()
{
    vector<int> tmp;
    char type;
    Container First;
    while (true)
    {
        cout << "Add figure? \'1\' - yes \'0\' -  no\n";
        int i = 0;
        cin >> i;
        if (i == 0)
            break;
        Shape *figure = NULL;
        cout << "What type do you need \'T\' - Triangle \'R\' - Rhombus \'C\' - Circle\n";
        cin >> type;
        switch (type)
        {
        case 'T':{
                  int tmp2;
                  cout << "Endter x:"; cin >> tmp2;
                  tmp.push_back(tmp2);
                  cout << "Endter y:"; cin >> tmp2;
                  tmp.push_back(tmp2);
                  cout << "Endter height:"; cin >> tmp2;
                  tmp.push_back(tmp2);
                  cout << "Endter weight:"; cin >> tmp2;
                  tmp.push_back(tmp2);
                  figure = new Triangle(tmp);
                  break;
        }
        case 'R':{int tmp2;
                  cout << "Endter x:"; cin >> tmp2;
                  tmp.push_back(tmp2);
                  cout << "Endter y:"; cin >> tmp2;
                  tmp.push_back(tmp2);
                  cout << "Endter height:"; cin >> tmp2;
                  tmp.push_back(tmp2);
                  cout << "Endter weight:"; cin >> tmp2;
                  tmp.push_back(tmp2);
                  figure = new Rhombus(tmp);
                  break;
        }
        case 'C':{int tmp2;
                  cout << "Endter x:"; cin >> tmp2;
                  tmp.push_back(tmp2);
                  cout << "Endter y:"; cin >> tmp2;
                  tmp.push_back(tmp2);
                  cout << "Endter radius:"; cin >> tmp2;
                  tmp.push_back(tmp2);
                  figure = new Circle(tmp);
                  break;
        }
        default:
            break;
        }
        First.addFigure(figure);
    }
    cout<<"save File\n";
    First.saveFile();
    First.printShapes();
}

int main()
{

    firstTest();
    return 0;
}
